package com.anolesoft.Planexecution.mapper;

import com.anolesoft.Planexecution.dto.MesBzzClbgDto;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface MesBzzClbgMapper {
    /**
     * 插入产量报告表
     */
    @Insert("INSERT INTO" +
            " MES_BZZ_CLBG(ZZJL,GRZJ,GRXKH,GRXM,GXZJ,GXM,GXH,NUM,DEGS,GS,JIXING,TUHAO,FACTORY_CODE,CREATE_TIME)" +
            " VALUES (#{zzjl},#{grzj},#{grxkh},#{grxm},#{gxzj},#{gxm},#{gxh},#{num},#{degs},#{gs},#{jixing},#{tuhao},#{factoryCode},SYSDATE)")
    int insertClbg(MesBzzClbgDto dto);

    /**
     * 修改开工状态为已开工
     */
    @Update("update mes_bzz_order set state = 1 where objuid = #{objuid}")
    int updateOrderState(MesBzzClbgDto dto);
}
